<template>
  <li class="cf">
    <div class="li-content">
      <img :src="childMsg.imgUrlIcon" alt=""  class="li-img" @click="toDetail(childMsg.id)" />
      <div class="centerContent text-left" @click="toDetail(childMsg.id)">
        <p class="font28">{{childMsg.name}}</p>
        <p class="fontaaa">10857人在玩&nbsp;&nbsp;<span>{{childMsg.gameSize}}</span></p>
        <p class="fontaaa">{{childMsg.comment}}</p>
      </div>
      <div class="downDtn ">
        <a :href="childMsg.downloadUrl" download="childMsg.name">
          下载
        </a>
      </div>
    </div>
  </li>
</template>

<script>
export default {
  name: 'introduceList',
  props: [ 'childMsg' ],
  data () {
    return {
      msg: ''
    }
  },
  methods: {
    toDetail (id) {
      this.$parent.toDetail(id)
      // this.$router.push({path: '/detail', query: { userId: id }})
    }
  },
  mounted: function () {
    this.$nextTick(function () {
      // Code that will run only after the
      // entire view has been rendered
    })
  }
}
</script>
<style scoped>
  a{
    color: #FFFFFF;
  }
  .li-content{
    display: flex;
    flex-direction: row;
  }
  .li-img{
    width: 70px; /*no*/
    height: 70px; /*no*/
  }
  .downDtn{
    flex:  0 0 60px; /*no*/
  }
  .centerContent{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    text-align: left;
    align-content: space-between;
    height: 77.5px;
  }
  .fontaaa{
    color: #aaaaaa;
  }
</style>
